<?php
/**
 * Created by PhpStorm.
 * User: xiangfeng
 * Date: 2022/4/8
 * Time: 10:22 AM
 */


use think\facade\Route;

Route::group('', function () {
    /*******************文件上传-阿里云************************/
    Route::post('uploadFileToOss', 'File/uploadFileToOss');//文件上传
});
/*********************** user **************************/
Route::group('user/', function () {
    Route::post('login', 'Login/doLogin');//登录(废弃)
    Route::post('authLogin', 'Login/authLogin');//授权登录
    Route::post('authRegister', 'Login/authRegister');//授权注册
    Route::post('getUserPhone', 'Login/getUserPhone');//获取手机号
    /*************************************************/
    Route::group('', function () {
        Route::get('getUserInfo', 'User/getUserInfo');//用户基本信息
        Route::get('getSerCardList', 'User/getSerCardList')->middleware([\app\api\http\middleware\MemberMiddleware::class]);//查询服务卡列表信息
        Route::get('getUserCardInfo', 'User/getUserCardInfo')->middleware([\app\api\http\middleware\MemberMiddleware::class]);//查询服务卡列表信息
        Route::post('userJoinFriend', 'Friend/userJoinFriend')->middleware([\app\api\http\middleware\MemberMiddleware::class]);//加好友
        Route::post('auditFriendApply', 'Friend/auditFriendApply')->middleware([\app\api\http\middleware\MemberMiddleware::class]);//好友申请处理
        Route::get('getFriendApplyList', 'Friend/getFriendApplyList')->middleware([\app\api\http\middleware\MemberMiddleware::class]);//好友申请
        Route::get('getFriendInfo', 'Friend/getFriendInfo');//好友详情
        Route::post('updateInfo', 'User/updateInfo');//修改基本资料
        Route::get('getColleageUser', 'User/getColleageUser')->middleware([\app\api\http\middleware\MemberMiddleware::class]);;//我的校友
        Route::post('loginOut', 'Login/loginOut');
    })->middleware([\app\api\http\middleware\JwtAuthMiddleware::class]);
    /*************************************************/
});
/*********************** article **************************/
Route::group('article/', function () {
    Route::get('list/:type_id', 'Article/getList');
    Route::get('info/:id', 'Article/getInfo');
    Route::get('getNewsList', 'Article/getNewsList');
})->ext('json')->denyExt('jpg|png|gif');

/*******************Wemini API ************************/
Route::group('wemini', function () {
    Route::post('subscribeSend', 'Wemini/subscribeSend');
        Route::get('getTmplIds', 'Wemini/getWeminiTmplIds');
});
